﻿using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    // NOTE: If you change the interface name "IGradeDetail" here, you must also update the reference to "IGradeDetail" in App.config.
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IGradeDetail
    {
        [OperationContract]
        DataSet GradeDetail_GetAll();

        [OperationContract]
        int GradeDetail_Using(int GradeDetailID);

        [OperationContract]
        GradeDetailInfo GradeDetail_GetInfo(int GradeDetailID);

        [OperationContract]
        DataSet GradeDetail_GetAmount(int _GradeID, int _Level);

        [OperationContract]
        DataSet GradeDetail_GetList(out int ItemCount,string branchcode, int currentPage, int pageSize,string keyWord, string orderBy, string orderDirection);

        [OperationContract]
        int GradeDetail_Insert(GradeDetailInfo eInfo);

        [OperationContract]
        bool GradeDetail_Update(GradeDetailInfo eInfo);

        [OperationContract]
        bool GradeDetail_Delete(int GradeDetailID);
    }

    [DataContract(Namespace = "http://HRMService")]
    public class GradeDetailInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }

        int _GradeID;
        [DataMember]
        public int GradeID
        {
            get { return _GradeID; }
            set { _GradeID = value; }
        }

        int _LevelID;
        [DataMember]
        public int LevelID
        {
            get { return _LevelID; }
            set { _LevelID = value; }
        }

        decimal _Amount;
        [DataMember]
        public decimal Amount
        {
            get { return _Amount; }
            set { _Amount = value; }
        }

        string _BranchCode;
        [DataMember]

        public string BranchCode
        {
            get { return _BranchCode; }
            set { _BranchCode = value; }
        }
        int _MonthValue;
        [DataMember]
        public int MonthValue
        {
            get { return _MonthValue; }
            set { _MonthValue = value; }
        }
    }
}
